import { CourseId, ProductID } from '..'
import { EProductType } from '../enum'
/**商品现实价格 */
export type PriceShowInfo = Array<{
  title: string // '商品金额'
  type: number // 1 //
  price: string //'528'
}>
/**授课老师 */
export type Main_teacher = {
  title: string //  '授课'
  teacher_name: string // '戴镜轩'
  avatar: string // 'https://static4.saasz.vdyoo.com/teacher/trm/1645061354879_1638934298344.png'
  teacher_type: 1
}
/**主讲老师 */
export type Counselor_teacher = {
  title: string //'班主任'
  teacher_name: string //'老师'
  avatar: string //'https://static1.saasz.vdyoo.com/teacher/2021/05/31/1622450894icon.png'
  teacher_type: string //'4'acher
}
/**福利讲义 */
export type GiftsDetail = {
  giftProductId: number // 500677
  giftProductTypeName: string //'其他'
  giftProductType: EProductType
  giftProductName: string // '初一数学培训班学习用书（春上·上海沪教版·A+）2'
  giftProductPrice: string // '6'
  giftProductNum: number //1
}
/**福利讲义 */
export type GoodsData = {
  giftProductNum: number // 1
  allProducPrice: string // '6'
  giftproductDesc: string //'若申请退费时讲义已签收，会扣除签收的讲义费用'
  giftsDetails: Array<GiftsDetail>
}
/**其他福利 */
/**福利讲义 */
export type OtherGiftsDetail = {
  giftType: EProductType //
  giftTypeName: string // '课程'
  giftProductNames: Array<string> //['初一数学赠课（收心专题课）']
}
/**其他赠品 */
export type OthersData = {
  giftProductName: string //'其他赠品'
  giftProductNum: number //1
  giftproductDesc: string // '支付成功后，其他赠品及时发放到您的账户中'
  giftsDetails: Array<OtherGiftsDetail>
}

/**商品总 */
export type Product = {
  product_type: EProductType
  resale: string // '528'
  status: string // '1'
  realPrice: string // '528'
  course_id: CourseId //  '1390566'
  productId: ProductID // '1390566'
  course_name: string // '初一数学培训班（春上·上海沪教版·A+）'
  subject_id: string // '2'
  difficulty_id: string // '4'
  halt_sale_time: string // '2023-03-23 23:59:59'
  sale_time: string // '2023-01-27 00:00:00'
  subject_name: string // '数学'
  total_sections: string // '12'
  price: string //  '528'
  schooltime_name: string //  '2月17日-3月24日·每周五19:00-20:50上课·24课时'
  is_live: 1
  stu_classify_ids: 0
  category: string // '8'
  grade_ids: string //  '8'
  term_ids: string // '54'
  sale_status: 1
  type_1_id: string // '649'
  version_id: string // '91'
  outline_ids: string // '1073350,1073351'
  difficulty_id_new: string //  '205'
  sale_id: string // '1526574'
  main_teacher: Array<Main_teacher>
  counselor_teacher: Array<Counselor_teacher>
  buygift_detail: {
    goodsData: GoodsData
    othersData: OthersData
  }
  buygift_info: Array<gift_info>
  courseTimeConflictInfo: CourseTimeConflictInfo
  promotionAmt: 0
  promotionType: string // ''
  sourceId: string // ''
}

/**商品下显示 */
export type gift_info = {
  giftProductName: string // '讲义福利'
  giftProductNum: number //1
}

export type CourseTimeConflictInfo = {
  hasConflict: 0 | 1
  text: string // '当前课程直播时间有冲突'
}
